Array.prototype.firstUnique = function () {
    let arr = this
    let len = arr.length
    let map = {}
    for (let i = 0; i < len; i++){
        const str = arr[i].toString();
        if (map[str] == undefined) {
            map[str] = 0
        }else{
            return 'index:' + i + '; element:' + arr[i]
        }
    }
    return "No Repeat Element"
}
let res = [1, 'b', 'a', 'c', 1 , 'a', 2, 'c'].firstUnique()
console.log(res)